home *** CD-ROM | disk | FTP | other *** search
/ Resource for Source: C/C++ / Resource for Source - C-C++.iso / codelib9 / v_11_08 / hellquis / testint.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-01  |  527 b   |  27 lines

  1. //testint.cpp  -- simple test routine for GetPrivateProfileInt
  2. #include "profiles.h"
  3. #include <string.h>
  4. #include <iostream.h>
  5.  
  6. void main()
  7. {
  8.     char app[81];
  9.     char key[81];
  10.     WORD val ;
  11.  
  12. //-- repeatedly test getting a specific key
  13.     for (;;)
  14.     {
  15.         cout << "Application :";
  16.         cin.get(app,sizeof(app));
  17.         cin.ignore();
  18.         cout << "Key :";
  19.         cin.get(key,sizeof(key)) ;
  20.         cin.ignore();
  21.         val = GetPrivateProfileInt
  22.         (app,key,12345,"test.ini");
  23.         cout << "val : " << val << "\n" ;
  24.     }
  25. }
  26.  
  27. //-- end of testint.cpp